<style type="text/css">
.text_area
{
	margin:0px;
	padding:0px;
	float:left;
	
}
.text_area label{margin-right:10px;/*width: 90px;*/}
.text_area input[type="text"]{ margin-right:20px; width:90px;}
.text_area input[type="text"].creditcard {width:120px;}
 input[type="submit"]{   
		background-color: #000000;
		border: thin solid #FFFFFF;
		color: #FFFFFF;
		cursor: pointer;
		font-family: arial;
		font-size: 18px;
		margin: 10px;
		padding-left: 10px;
		padding-right: 10px;
	}


</style>

<div class="yourAccMain">
     <h6>Shipping &amp; Payment</h6>
     <?php
			if(isset($cart) and ($cart))
				{
		?>
     <div class="yourAccMain_L_in">
          <div class="yourAccMain_L_in_L">
               <h2>Shipping to</h2>
          </div>
          <div class="yourAccMain_L_in_R">
               <?php
							if(isset($Address) and $Address)
								{
							?>
               <div class="def_div f_left">
                    <div class="acc_form_2 ">
                         <div class="seller_right_pro"> <span class="text_form1"> <b> <?php echo $Address['Address']['name']; ?></b><br />
                              <?php echo $Address['Address']['add1']; ?><br />
                              <?php echo $Address['Address']['add2']; ?><br />
                              <?php echo $Address['Address']['city']; ?><br />
                              <?php echo $Address['Address']['zip']; ?><br />
                              Phone: <?php echo $Address['Address']['phone']; ?> <br />
                              </span> </div>
                    </div>
               </div>
               <?php
								}
						?>
          </div>
          <div class="pad_10"></div>
          <div class="common_border1"></div>
          <div class="pad_10"></div>
          <div class="yourAccMain_L_in_L">
               <h2>Shipping these item(s)</h2>
          </div>
          <div class="yourAccMain_L_in_R">
               <table width="100%" border="0" cellspacing="0" cellpadding="0" class="table_cart">
                    <tr>
                         <th width="75%" scope="col">Type/Item/Price</th>
                         <th width="18%" scope="col">QTY </th>
                    </tr>
                    <?php
						foreach($cart['product_id'] as $product_id)
							{
					?>
                    <tr>
                         <td><div class="item_list_B">
                                   <ul>
                                        <li><span> <?php echo $html->link($product_id['Product']['name'], array('controller'=>'products', 'action'=>'product', $product_id['Product']['slug']), array('escape'=>false));?> </span></li>
                                        <li>
                                             <p> <span class="red">$<?php echo $product_id['Cart_price']; ?></span> <?php echo $product_id['Product']['stock_detail']; ?></p>
                                        </li>
                                        <li>
                                             <p><b>Condition :</b> <?php echo $html->link($product_id['Product']['condition']['name'], array('controller'=>'products', 'action'=>'offer_listing', $product_id['Product']['wisn'], $product_id['Product']['condition']['slug']), array('escape'=>false));?></p>
                                        </li>
                                   </ul>
                              </div></td>
                         <td align="center"><b><?php echo $product_id['Cart_quantity']; ?></b></td>
                    </tr>
                    <?php
						}
					?>
               </table>
          </div>
          <div class="pad_10"></div>
          <div class="common_border1"></div>
          <div class="pad_10"></div>
          <div class="yourAccMain_L_in_L"> <h2> Pay With Credit Card</h2> </div>
          <div class="yourAccMain_L_in_R">
               <?php
    if ($METHOD_TO_USE == "AIM") {
        ?>
				<?php echo $form->create('Paypal', array('action'=>"paypayment", 'id'=>'checkout_form')) ?>
               <?php
    } else {
        ?>
               <form method="post" action="<?php echo (AUTHORIZENET_SANDBOX ? AuthorizeNetDPM::SANDBOX_URL : AuthorizeNetDPM::LIVE_URL)?>" 
               id="checkout_form">
	<?php
        $time = time();
        $fp_sequence = $time;
        $fp = AuthorizeNetDPM::getFingerprint(AUTHORIZENET_API_LOGIN_ID, AUTHORIZENET_TRANSACTION_KEY, $amount, $fp_sequence, $time);
        $sim = new AuthorizeNetSIM_Form(
            array(
            'x_amount'        => $amount,
            'x_fp_sequence'   => $fp_sequence,
            'x_fp_hash'       => $fp,
            'x_fp_timestamp'  => $time,
            'x_relay_response'=> "TRUE",
            'x_relay_url'     => $coffee_store_relay_url,
            'x_login'         => AUTHORIZENET_API_LOGIN_ID,
            'x_test_request'  => TEST_REQUEST,
            )
        );
        echo $sim->getHiddenFieldString();
    }
    ?>
                      <input type="hidden" class="required" size="15" name="data[Pay][OrderId]" value="<?php
					  echo $order_id;
                      ?>" >

                    <fieldset>
                         <div class="text_area">
                              <label>Credit Card Number</label>
                              <input type="text" class="text required creditcard " size="15" name="data[Pay][x_card_num]" value="6011000000000012" >
                              </input>
                         </div>
                         <div class="text_area">
                              <label>Exp.</label>
                              <input type="text" class="text required " size="4" name="data[Pay][x_exp_date]" value="04/15">
                              </input>
                         </div>
                         <div class="text_area">
                              <label>CCV</label>
                              <input type="text" class="text required " size="4" name="data[Pay][x_card_code]" value="782">
                              </input>
                         </div>
                    </fieldset>
                         <div  class="clear"></div>
                    <fieldset>
                         <div class="text_area">
                              <label>First Name</label>
                              <input type="text" class="text required" size="15" name="data[Pay][x_first_name]" value="John">
                              </input>
                         </div>
                         <div class="text_area">
                              <label>Last Name</label>
                              <input type="text" class="text required" size="14" name="data[Pay][x_last_name]" value="Doe">
                              </input>
                         </div>
                    </fieldset>
                    <div  class="clear"></div>
                    <fieldset>
                         <div class="text_area">
                              <label>Address</label>
                              <input type="text" class="text required" size="26" name="data[Pay][x_address]" value="123 Four Street">
                              </input>
                         </div>
                         <div class="text_area">
                              <label>City</label>
                              <input type="text" class="text required" size="15" name="data[Pay][x_city]" value="San Francisco">
                              </input>
                         </div>
                    </fieldset>
                    <div  class="clear"></div>
                    <fieldset>
                         <div class="text_area">
                              <label>State</label>
                              <input type="text" class="text required" size="4" name="data[Pay][x_state]" value="CA">
                              </input>
                         </div>
                         <div class="text_area">
                              <label>Zip Code</label>
                              <input type="text" class="text required" size="9" name="data[Pay][x_zip]" value="94133">
                              </input>
                         </div>
                         <div class="text_area">
                              <label>Country</label>
                              <input type="text" class="text required" size="22" name="data[Pay][x_country]" value="US">
                              </input>
                         </div>
                    </fieldset>
                     <div  class="clear"></div>
                    <input type="submit" value="Pay" class="submit buy">
               </form>
          </div>
     </div>
     <?php
							}
	   ?>
</div>
